import request from '@/utils/request'

// 查询首页资源列表
export function listHomepageResource(query) {
  return request({
    url: '/system/homepageResource/list',
    method: 'get',
    params: query
  })
}

// 查询首页资源详细
export function getHomepageResource(id) {
  return request({
    url: '/system/homepageResource/' + id,
    method: 'get'
  })
}

// 新增首页资源
export function addHomepageResource(data) {
  return request({
    url: '/system/homepageResource',
    method: 'post',
    data: data
  })
}

// 修改首页资源
export function updateHomepageResource(data) {
  return request({
    url: '/system/homepageResource',
    method: 'put',
    data: data
  })
}

// 删除首页资源
export function delHomepageResource(id) {
  return request({
    url: '/system/homepageResource/' + id,
    method: 'delete'
  })
}
